package com.ittest.service.impl.kafka;

import com.ittest.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.stereotype.Service;

@Service
public class MessageServerKafkaImpl implements MessageService {


    @Autowired
    private KafkaTemplate kafkaTemplate;


    @Override
    public void sendMessage(String id) {
        System.out.println("带发送短信的订单已纳入处理队列(kafka)，id："+id);
        kafkaTemplate.send("ittest",id);
    }

    @Override
    public String doMessage() {
        return null;
    }
}
